package com.k2data.k2app.domain.po.v1;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;

import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.time.ZonedDateTime;
import java.util.ArrayList;
import java.util.List;

/**
 * 故障信息
 * @author
 * @date 2017年11月28日15:54:22
 */
@Data
@Table(name = "Fault")
@JsonInclude(JsonInclude.Include.NON_NULL)
public class Fault {

    @Transient
    private static final long serialVersionUID = -819584920179009962L;

    @Id
    @GeneratedValue(generator = "JDBC")
    private Long id;
    private Long parentId;
    private String faultName;
    private String faultCode;
    private String faultDesc;
    private Long faultCreator;

    private Integer isDelete;
    @JsonIgnore
    private ZonedDateTime createTime;
    @JsonIgnore
    private ZonedDateTime updateTime;

    @Transient
    private List<Fault> children = new ArrayList<>();
}
